import request from '@/config/axios'

// 获取优惠券表格数据
export const getCouponTable = (data: any): Promise<IResponse> => {
    return request.post({ url: '/siyun/SyOperationController/selCoupon', data })
  }
 // 获取优惠券表格数据
export const DelCoupon = (data: any): Promise<IResponse> => {
  return request.post({ url: '/siyun/SyOperationController/delCoupon', data })
}
 // 添加优惠卷
 export const AddCoupon = (data: any): Promise<IResponse> => {
  return request.post({ url: '/siyun/SyOperationController/addCoupon', data })
}
 // 修改上下架状态
 export const changeOnline = (data: any): Promise<IResponse> => {
  return request.post({ url: '/siyun/SyOperationController/updCouponOnline', data })
}
 // 获取用户使用优惠券记录
 export const getUseCouponTable = (data: any): Promise<IResponse> => {
  return request.post({ url: '/siyun/SyOperationController/selCouponUsed', data })
}
 // 赠送优惠券
 export const giveCoupon = (data: any): Promise<IResponse> => {
  return request.post({ url: '/siyun/SyOperationController/addCouponUsed', data,})
}
